{% extends "base_generic.html" %}
{% block content %}
        <h1><a href="/cosas">Cosas</a></h1>
        <!-- <h2><a href="/admin/cosas//new/" class="add">Añadir cosa</a></h2> -->

        <table class="imgswithoutborders">
        {% for cosa in cosas %}
          <tr>
            <td><img src="/cosa/{% if cosa.slug %}{{ cosa.slug }}{% else %}{{ cosa.key }}{% endif %}/img" width="40" height="40" /></td>
            <td><span style="color: #ccc;">{{ cosa.title }}</span>
              <br />{{ cosa.categoria }} - {{ cosa.tag }}</td>
            <td>{% if cosa.description|truncatewords:18 %}{% else %}Sin desc.{% endif %}</td>  
            <td><a href="/cosa/{% if cosa.slug %}{{ cosa.slug }}{% else %}{{ cosa.key }}{% endif %}">Public</a></td>
            <td><a href="/admin/cosas/{{ cosa.key }}/edit/">Editar</a></td>
            <td><a href="/admin/cosas/{{ cosa.key }}/delete/" onclick="if(confirm('¿Do you really want to delete {{ cosa.name }}?')){return true;}else{return false;}">Borrar</a></td>
          </tr>
        {% endfor %}
        </table>

{% endblock %}
